CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
LDFLAGS += -L$(XEN_LIBXENSTAT)
LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
+CFLAGS += -DHOST_$(XEN_OS)
.PHONY: all
all: xentop
#define KEY_ESCAPE '\x1B'
+#ifdef HOST_SunOS
+/* Old curses library on Solaris takes non-const strings. */
+#define curses_str_t char *
+#else
+#define curses_str_t const char *
+#endif
+
/*
* Function prototypes
*/
if (!batch) {
if((current_row() < lines()-1)) {
va_start(args, fmt);
- vwprintw(stdscr, fmt, args);
+ vwprintw(stdscr, (curses_str_t)fmt, args);
va_end(args);
}
} else {
static void attr_addstr(int attr, const char *str)
{
attron(attr);
- addstr(str);
+ addstr((curses_str_t)str);
attroff(attr);
}